\(\int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx\) [122]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 21, antiderivative size = 46 \[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d} \]

[Out]

arctan(1/2*a^(1/2)*tan(d*x+c)*2^(1/2)/(a+a*sec(d*x+c))^(1/2))*2^(1/2)/d/a^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3880, 209} \[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]

[In]

Int[Sec[c + d*x]/Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(Sqrt[2]*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(Sqrt[a]*d)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3880

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2/f, Subst[Int[1/(2
*a + x^2), x], x, b*(Cot[e + f*x]/Sqrt[a + b*Csc[e + f*x]])], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0
]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \\ & = \frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.39 \[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right ) \tan (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \]

[In]

Integrate[Sec[c + d*x]/Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(Sqrt[2]*ArcTanh[Sqrt[1 - Sec[c + d*x]]/Sqrt[2]]*Tan[c + d*x])/(d*Sqrt[1 - Sec[c + d*x]]*Sqrt[a*(1 + Sec[c + d
*x])])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(92\) vs. \(2(37)=74\).

Time = 0.88 (sec) , antiderivative size = 93, normalized size of antiderivative = 2.02

method result size
default \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \sqrt {2}\, \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}\right )}{d a}\) \(93\)

[In]

int(sec(d*x+c)/(a+a*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(a*(1+sec(d*x+c)))^(1/2)*2^(1/2)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*ln(csc(d*x+c)-cot(d*x+c)+(cot(d*x+c)
^2-2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 158, normalized size of antiderivative = 3.43 \[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [\frac {\sqrt {2} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{2 \, d}, -\frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a} d}\right ] \]

[In]

integrate(sec(d*x+c)/(a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(2)*sqrt(-1/a)*log(-(2*sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(-1/a)*cos(d*x + c)*sin(d*
x + c) - 3*cos(d*x + c)^2 - 2*cos(d*x + c) + 1)/(cos(d*x + c)^2 + 2*cos(d*x + c) + 1))/d, -sqrt(2)*arctan(sqrt
(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c)))/(sqrt(a)*d)]

Sympy [F]

\[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\sec {\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]

[In]

integrate(sec(d*x+c)/(a+a*sec(d*x+c))**(1/2),x)

[Out]

Integral(sec(c + d*x)/sqrt(a*(sec(c + d*x) + 1)), x)

Maxima [F]

\[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {\sec \left (d x + c\right )}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \]

[In]

integrate(sec(d*x+c)/(a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sec(d*x + c)/sqrt(a*sec(d*x + c) + a), x)

Giac [A] (verification not implemented)

none

Time = 0.65 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.28 \[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\sqrt {2} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} d \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} \]

[In]

integrate(sec(d*x+c)/(a+a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

-sqrt(2)*log(abs(-sqrt(-a)*tan(1/2*d*x + 1/2*c) + sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)))/(sqrt(-a)*d*sgn(cos(d*
x + c)))

Mupad [F(-1)]

Timed out. \[ \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {1}{\cos \left (c+d\,x\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]

[In]

int(1/(cos(c + d*x)*(a + a/cos(c + d*x))^(1/2)),x)

[Out]

int(1/(cos(c + d*x)*(a + a/cos(c + d*x))^(1/2)), x)